# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: xmlrpc_calendar_client.py 
@time: 2019/7/22 下午4:25
"""
'''
展示xmlrpc版的日历客户端
'''
from xmlrpc.client import ServerProxy

serve = ServerProxy('http://localhost:8888')
month = serve.getMonth(2019, 7)
print(month)

year = serve.getYear(3016)
print(year)

dict = serve.getDict()
print(dict)

for keys in dict.keys():
    print(f"{keys}, {dict[keys]}")
